using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using emp.BLL.SysManage;
using emp.ProcessFlow;
using emp.Model;
using emp.Model.SysManage;
using emp.BLL;
using emp.Utility;
using emp.Model.SysManage;

public partial class crm_questionnaire_CopyQuestionnaire : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.Page.IsPostBack)
        {
            string page1 = "";
            int quruid = 0;
            string qurname = "";
            if (Request["cur_page"] != null)
            {
                page1 = Request["cur_page"].ToString();
            }
            if (Request["QunaireID"] != null && Request["QunaireID"] != "")
            {
                quruid = Convert.ToInt32(Request["QunaireID"].ToString());
            }
            if (Request["QunaireName"] != null)
            {
                qurname = Request["QunaireName"].ToString();
            }
            int userid = 0;
            try
            {
                if (HttpContext.Current.Session["USER_KEY"] != null)
                {
                    UserInfo myUserInfo = (UserInfo)HttpContext.Current.Session["USER_KEY"];
                    userid = myUserInfo.UserID;
                }

            }
            catch { }


            Questionnaire quenaire = new Questionnaire();
            quenaire.getCopyQuestionnaire(quruid, qurname, userid);
            Response.Redirect("QuestionnaireList.aspx?cur_page=" + page1);
        }
    }
}
